<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div class="modal-dialog ms-modal-dialog" id="reverse-order-mark-ticket-modal-dialog">
  <div class="modal-content">

    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
              class="sr-only">Close</span></button>
      <h4 class="modal-title">标记核销</h4>
    </div>

    <form class="form-horizontal ms-form" role="form" method="POST"
          action="${ctx.host}/reverse-orders/${reverseOrder.id}/mark-consumed" data-validate="true" id="reverse-order-mark-ticket-form">

<%--        <input type="hidden" name="_method" value="PATCH"/>--%>

      <div class="modal-body">

        <p>确定核销 订单号为：${reverseOrder.code} 订单吗？</p>
        <p></p>
      </div>

      <div class="modal-footer ms-modal-footer">
        <button type="submit" class="btn ms-btn btn-primary">确定</button>
        <button type="button" class="btn ms-btn ms-btn-gary" data-dismiss="modal">取消</button>
      </div>
    </form>

  </div>
</div>
<script>

    $("#reverse-order-mark-ticket-modal-dialog").find('form[data-validate="true"]').bt_validate()  //bind validate

    var $form = $("#reverse-order-mark-ticket-modal-dialog").find("form")                          //bind shiftform

    $form.shiftform({
      beforeSubmit: function (el) {
        $form.trigger("validate.ajax.submit");
        return $.bt_validate.result[$.bt_validate.form_id]
      }
    })


</script>
